package system

import (
	"github.com/gogf/gf/v2/frame/g"
	"server/api"
)

type RoleCreateReq struct {
	g.Meta `path:"/system/role/create" tags:"系统管理-角色" method:"post" summary:"新增" description:"角色用于关联用户、菜单栏、权限"`
	Name   string `v:"required"`
	Code   string `v:"required"`
}
type RoleCreateRes struct {
	Id int64 `json:"id"`
}

type RoleUpdateReq struct {
	g.Meta `path:"/system/role/update" tags:"系统管理-角色" method:"post" summary:"修改" description:"修改角色信息"`
	Id     int64  `v:"required"`
	Name   string `v:"required"`
	Code   string `v:"required"`
}
type RoleUpdateRes struct {
}

type RoleDeleteReq struct {
	g.Meta `path:"/system/role/delete" tags:"系统管理-角色" method:"post" summary:"删除" description:"删除系统角色"`
	Id     int64 `v:"required"`
}
type RoleDeleteRes struct {
}

type RoleListReq struct {
	g.Meta `path:"/system/role/list" tags:"系统管理-角色" method:"GET" summary:"列表" description:"角色列表"`
	api.PagerReq
	Code string `dc:"角色标识符"`
	Name string `dc:"角色名称"`
}
type RoleListRes struct {
	api.PagerRes
}
